//
//  ZMHomeVC.m
//  testDemo
//
//  Created by 赵林瑞 on 16/5/11.
//  Copyright © 2016年 RZOL. All rights reserved.
//

#import "ZMHomeVC.h"

#import "ZMAutoScrollLabelController.h"
#import "ZMTest_1_Controller.h"

#import "HWPopTool.h"
#import "ZMTKAlert1.h"
#import "XDTKAlert_3.h"

#import "WJYAlertView.h"

@interface ZMHomeVC ()
@property (strong, nonatomic) IBOutlet UIButton *listScroll;

@end

@implementation ZMHomeVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    UILabel *titleLabel = [UILabel new];
    titleLabel.font = [UIFont systemFontOfSize:14];
    NSString *titleContent = @"亲，欢迎您通过以下方式与我们的营销顾问取得联系，交流您再营销推广工作中遇到的问题，营销顾问将免费为您提供咨询服务。";
    titleLabel.text = titleContent;
    titleLabel.numberOfLines = 0;//多行显示，计算高度
    titleLabel.textColor = [UIColor lightGrayColor];
    CGSize titleSize = [titleContent boundingRectWithSize:CGSizeMake(kScreeWith, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14]} context:nil].size;
    titleLabel.size = titleSize;
    titleLabel.x = 0;
    titleLabel.y = 100;
    
    [self.view addSubview:titleLabel];
}

- (IBAction)listScroll:(id)sender {
    [self presentViewController:[ZMAutoScrollLabelController new] animated:YES completion:nil];
}

- (IBAction)test1:(id)sender {
    [self.navigationController pushViewController:[ZMTest_1_Controller new] animated:YES];
}
- (IBAction)Alert:(id)sender {
    /*
    ZMTKAlert1 *alertView = [[NSBundle mainBundle] loadNibNamed:@"ZMTKAlert1" owner:self options:nil].lastObject;
    alertView.frame = CGRectMake(0, 0, 245*SCREEN_SCALE, 120*SCREEN_SCALE);
    alertView.layer.cornerRadius = 5;
    
    [[HWPopTool sharedInstance] showWithPresentView:alertView animated:NO];
     */
    
    /*
    XDTKAlert_3 *alertView = [[NSBundle mainBundle] loadNibNamed:@"XDTKAlert_3" owner:self options:nil].lastObject;
    
    alertView.frame = CGRectMake(0, 0, 270*SCREEN_SCALE, 150*SCREEN_SCALE + 70);
    alertView.layer.cornerRadius = 5;
    [[HWPopTool sharedInstance] showWithPresentView:alertView animated:NO];
     */
    
    
    NSLog(@"123");
}

// 计算文本高度
- (IBAction)JiSuanTextHeight:(id)sender {
    
    [WJYAlertView showTwoButtonsWithTitle:@"提示信息" Message:@"你可以设置ButtonType的样式来调整效果，而且还可以分开设置，更加灵活，不效果项目要求可以修改源代码" ButtonType:WJYAlertViewButtonTypeCancel ButtonTitle:@"取消" Click:^{
        NSLog(@"您点取消事件");
    } ButtonType:WJYAlertViewButtonTypeDefault ButtonTitle:@"确定" Click:^{
        NSLog(@"你点确定事件");
    }];
    
}

@end
